package com.smart.web.controller.system;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smart.common.core.page.PageQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.smart.common.annotation.Log;
import com.smart.common.core.controller.BaseController;
import com.smart.common.core.domain.AjaxResult;
import com.smart.common.enums.BusinessType;
import com.smart.common.core.domain.R;
import com.smart.system.domain.Audio;
import com.smart.system.service.IAudioService;
import com.smart.common.utils.poi.ExcelUtil;
import com.smart.common.core.page.TableDataInfo;

/**
 * 【请填写功能名称】Controller
 * 
 * @author smart
 * @date 2025-01-07
 */
@RestController
@RequestMapping("/system/audio")
@Api(tags = "聊天表")
public class AudioController extends BaseController
{
    @Autowired
    private IAudioService audioService;

    //获取聊天记录
    @ApiOperation(value = "获取聊天记录")
    @GetMapping("/getChatRecord")
    public R<IPage<Audio>> getChatRecord(PageQuery query, Integer employeeId, Integer toEmployeeId) {
        Page<Audio> list = audioService.getChatRecord(query.toPage(),employeeId, toEmployeeId);
        return R.ok(list);
    }
}
